public class FileStream extends java.lang.Object implements SeekableInputStream, SeekableOutputStream
Modifier and Type | Field and Description |
---|---|
protected java.io.RandomAccessFile |
file |
SEEK_CUR, SEEK_END, SEEK_SET
Constructor and Description |
---|
FileStream(java.io.File path,
java.lang.String mode) |
FileStream(java.lang.String path,
java.lang.String mode) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
position() |
int |
read(byte[] buf) |
long |
seek(long offset,
int whence) |
void |
truncate() |
void |
write(byte[] buf,
int off,
int len) |
public FileStream(java.lang.String path, java.lang.String mode) throws java.io.IOException
java.io.IOException
public FileStream(java.io.File path, java.lang.String mode) throws java.io.IOException
java.io.IOException
public int read(byte[] buf) throws java.io.IOException
read
in interface SeekableInputStream
java.io.IOException
public void write(byte[] buf, int off, int len) throws java.io.IOException
write
in interface SeekableOutputStream
java.io.IOException
public long seek(long offset, int whence) throws java.io.IOException
seek
in interface SeekableStream
java.io.IOException
public long position() throws java.io.IOException
position
in interface SeekableStream
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public void truncate() throws java.io.IOException
truncate
in interface SeekableOutputStream
java.io.IOException